// Parts Copyright 2008 Newgrove Consultants Limited
// Modified By John Diss 
// From original work:
//
using System;

namespace MsSqlSpatial
{
    public class InvalidSridException : ApplicationException
    {
        public InvalidSridException(int? srid)
            : base(
                string.Format("Invalid SRID {0}. Valid values are -1 and those in [ST].[SPATIAL_REF_SYS] table.", srid))
        {
        }
    }

    public class DifferentSridException : ApplicationException
    {
        public DifferentSridException(int? srid1, int? srid2)
            : base(string.Format("Operation on geometries with different SRIDs ({0} and {1})", srid1, srid2))
        {
        }

        public DifferentSridException(string srid1, string srid2)
            : this(Global.ParseSridString(srid1), Global.ParseSridString(srid2))
        {
        }
    }
}